package com.gxa.modules.pc.fee.controller;

import com.gxa.common.utils.Result;
import com.gxa.modules.pc.fee.service.InOrderDetailService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 住院消费订单信息表 前端控制器
 * </p>
 *
 * @author gxa
 * @since 2022-11-12 05:31:54
 */
@RestController
@RequestMapping("/in-order-detail")
@Api(tags = "住院消费订单信息表")
public class InOrderDetailController {
    @Autowired
    private InOrderDetailService inOrderDetailService;

    @PutMapping("/update")
    @ApiOperation("修改备注")
    public Result list(@RequestParam String orderNum, @RequestParam String remarks){
        try {
            this.inOrderDetailService.updateOrderNotes(orderNum,remarks);
            return new Result().ok("修改成功");
        }catch (Exception e){
            e.printStackTrace();
            return new Result().error("修改失败");
        }
    }

}
